import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import HomePage from '@/components/HomePage' //首页
import Discover from '@/components/Discover'//发现
import Myself from '@/components/Myself'//我的
import Singer from '@/components/Singer'//歌手
import Login from '@/components/Login'//登录
import Register from '@/components/Register'//注册
import Iview from '@/components/Iview'//
import Hot from '@/components/Hot'//排行榜
import Rise from '@/components/Rise'//飙升榜模块
import RiseOne from '@/components/RiseOne'//飙升榜详情
import Classify from '@/components/Classify'//分类歌单
import Relaxed from '@/components/Relaxed'//轻松
import Search from '@/components/Search'//搜索
import Recently from '@/components/Recently'//最近播放
import News from '@/components/News'//我的消息
import LocalMusic from '@/components/LocalMusic'//本地音乐
import Download from '@/components/Download'//我的下载
import Recommend from '@/components/Recommend'//每日推荐
import Shoucang from '@/components/Shoucang'//我的收藏
import Setting from '@/components/Setting'//设置
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      redirect:'/homePage',
      component: HelloWorld,
      children:[
      {
      	path:'/homePage',//首页
      	component:HomePage,
      },
      {
      	path:'/discover',//发现
      	component:Discover
      },
      {
      	path:'/myself',//我的
      	component:Myself
      }
      
      ]
    },
    {
    	path:'/iview',//模板
    	component:Iview,
    	children:[
	    	{
	    		path:'/singer',//歌手
	    		component:Singer
	    	},
	    	{
	    		path:'/hot',//排行榜
	    		component:Hot
	    	},
	    	{
	    		path:'/classify',//分类歌单
	    		component:Classify
	    	},
	    	{
	    		path:'/recommend',//每日推荐
	    		component:Recommend
	    	}
    	]
    },
    {
    	path:'/rise',//飙升榜模块
    	component:Rise,
    	children:[
				{
					path:'/riseone',//飙升榜
					component:RiseOne
				},
				{
					path:'/relaxed',//分类歌单-轻松
					component:Relaxed
				}
    	]
    },
    
    {
    	path:'/recently',//最近播放
    	component:Recently
    },
    {
    	path:'/news',//我的消息
    	component:News
    },
    {
    	path:'/localmusic',//本地音乐
    	component:LocalMusic
    },
    {
    	path:'/download',//我的下载
    	component:Download
    },
    {
    	path:'/search',//搜索页面
    	component:Search
    },
    {
    	path:'/shoucang',//我的收藏
    	component:Shoucang
    },
    {
    	path:'/setting',//设置
    	component:Setting
    },
    {
    	path:'/login',//登录
    	component:Login
    },
    {
    	path:'/register',//注册
    	component:Register
    }
  ]
})
